package follow.juc.demo;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Author tu zy
 * @Date 2020/12/10 9:41
 * @Version 1.0
 */
public class ThreadDemo3 {
    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10,10,0L, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<>(10));
        threadPoolExecutor.execute(()->{
            System.out.println("我是线程池");
        });
        threadPoolExecutor.shutdown();
    }
}
